package com.checkbox.widgetset;

import com.checkbox.widgetset.client.share.SpanState;
import com.vaadin.ui.AbstractComponent;

@SuppressWarnings("serial")
public class Span extends AbstractComponent {
  public Span() {
    this("");
  }

  public Span(String text) {
    setText(text);
    setDescription(text);
  }

  @Override
  public SpanState getState() {
    return (SpanState) super.getState();
  }

  public String getText() {
    return getState().text;
  }

  public void setText(String text) {
    getState().text = text;
  }
}